package com.ins1st.plus.core.annotation;

import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.lang.annotation.*;

/**
 * 自定义请求注解 集成RequestMapping和ResponseBody
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RequestMapping
@ResponseBody
public @interface Req4Json {

    @AliasFor(annotation = RequestMapping.class)
    String name() default "";

    @AliasFor(annotation = RequestMapping.class)
    String[] value() default "";

    @AliasFor(annotation = RequestMapping.class)
    String[] path() default "";

    /**
     * 日志标题
     *
     * @return
     */
    String log() default "";


    /**
     * 参数
     * @return
     */
    String parameters() default "";


    /**
     * 是否入库
     *
     * @return
     */
    boolean db() default true;


}
